package com.topsoft.email.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.mvc.core.dao.impl.BaseDAOImpl;
import com.topsoft.email.dao.IUserInfoDao;
import com.topsoft.email.model.UserInfo;


@Component
public class UserInfoDaoImpl  extends  BaseDAOImpl<UserInfo,String> implements IUserInfoDao{

	@SuppressWarnings("unchecked")
	@Override
	@Transactional
	public UserInfo getDataThread() {
		//List<UserInfo> list=this.openSession().createSQLQuery("select * from t_userinfo").addEntity(UserInfo.class).list();
		
		
		List<UserInfo> list=this.getSession().createQuery("from UserInfo").list();
		
		if(null!=list){
			return list.get(0);
		}
		return null;
	}


}
